package com.example.demo.controller;

import com.example.demo.Service.IProvinceCityDistrictService;
import com.example.demo.core.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/area")
@CrossOrigin(origins = "*")
public class ProvinceCityDistrictController {

    @Autowired
    private IProvinceCityDistrictService provinceCityDistrictService;

    @GetMapping("/{pid}")
    public Result select(@PathVariable Long pid){
        return Result.success(provinceCityDistrictService.selectByPid(pid));
    }
}
